import instance from '../util/request'

/**
 *  获取指定用户的所有券
 * @returns  
 */
export const coupon_list = (id)=>{ 
  return instance.get("/coupon/user",{
    params:{id}
  })
}
/**
 *  获取券详情
 * @returns  
 */
export const coupon_info = (id)=>{ 
  return instance.get("/coupon/id",{
    params:{id}
  })
}
/**
 *  获取所有用户的券
 * @returns  
 */
export const all_coupon_list = (page)=>{ 
  return instance.get("/coupon/list",{
    params:page
  })
}

/**
 *  删除指定用户的优惠券
 * @returns  
 */
export const del_coupon = (data)=>{ 
  return instance.delete("/coupon",{
    params:data
  })
}